/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Ventanas;

import java.awt.*;
import java.io.File;
import java.io.InputStream;
/**
 *
 * @author USUARIO
 */
public class frmMain extends javax.swing.JFrame {

    /**
     * Creates new form frmMain
     */
    public frmMain() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panContainer = new javax.swing.JPanel();
        panMenu = new javax.swing.JPanel();
        btnVentas = new javax.swing.JButton();
        btnProductos = new javax.swing.JButton();
        btnUsuarios = new javax.swing.JButton();
        btnPedidos = new javax.swing.JButton();
        btnClientes = new javax.swing.JButton();
        btnReportes = new javax.swing.JButton();
        panTrabajo = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setBackground(new java.awt.Color(243, 245, 224));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        panContainer.setBackground(new java.awt.Color(253, 245, 224));

        panMenu.setBackground(new java.awt.Color(127, 85, 58));
        panMenu.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(243, 97, 110)));
        panMenu.setLayout(new java.awt.GridLayout(1, 0));

        btnVentas.setBackground(new java.awt.Color(127, 85, 58));
        btnVentas.setFont(new java.awt.Font("Arial Unicode MS", 1, 14)); // NOI18N
        btnVentas.setForeground(new java.awt.Color(234, 95, 106));
        btnVentas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cream1.png"))); // NOI18N
        btnVentas.setText("Ventas");
        btnVentas.setBorder(null);
        btnVentas.setBorderPainted(false);
        btnVentas.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnVentasMouseClicked(evt);
            }
        });
        panMenu.add(btnVentas);

        btnProductos.setBackground(new java.awt.Color(127, 85, 58));
        btnProductos.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        btnProductos.setForeground(new java.awt.Color(234, 95, 106));
        btnProductos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cream_choco.png"))); // NOI18N
        btnProductos.setText("Productos");
        btnProductos.setBorder(null);
        btnProductos.setBorderPainted(false);
        btnProductos.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnProductosMouseClicked(evt);
            }
        });
        panMenu.add(btnProductos);

        btnUsuarios.setBackground(new java.awt.Color(127, 85, 58));
        btnUsuarios.setFont(new java.awt.Font("Arial Unicode MS", 1, 14)); // NOI18N
        btnUsuarios.setForeground(new java.awt.Color(234, 95, 106));
        btnUsuarios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cream_funny.png"))); // NOI18N
        btnUsuarios.setText("Usuarios");
        btnUsuarios.setBorder(null);
        btnUsuarios.setBorderPainted(false);
        btnUsuarios.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnUsuariosMouseClicked(evt);
            }
        });
        panMenu.add(btnUsuarios);

        btnPedidos.setBackground(new java.awt.Color(127, 85, 58));
        btnPedidos.setFont(new java.awt.Font("Arial Unicode MS", 1, 14)); // NOI18N
        btnPedidos.setForeground(new java.awt.Color(234, 95, 106));
        btnPedidos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cream_pink.png"))); // NOI18N
        btnPedidos.setText("Pedidos");
        btnPedidos.setBorder(null);
        btnPedidos.setBorderPainted(false);
        btnPedidos.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnPedidosMouseClicked(evt);
            }
        });
        panMenu.add(btnPedidos);

        btnClientes.setBackground(new java.awt.Color(127, 85, 58));
        btnClientes.setFont(new java.awt.Font("Arial Unicode MS", 1, 14)); // NOI18N
        btnClientes.setForeground(new java.awt.Color(234, 95, 106));
        btnClientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/milky_blue.png"))); // NOI18N
        btnClientes.setText("Clientes");
        btnClientes.setBorder(null);
        btnClientes.setBorderPainted(false);
        btnClientes.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnClientesMouseClicked(evt);
            }
        });
        panMenu.add(btnClientes);

        btnReportes.setBackground(new java.awt.Color(127, 85, 58));
        btnReportes.setFont(new java.awt.Font("Arial Unicode MS", 1, 14)); // NOI18N
        btnReportes.setForeground(new java.awt.Color(234, 95, 106));
        btnReportes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/choko_crema.png"))); // NOI18N
        btnReportes.setText("Reportes");
        btnReportes.setBorder(null);
        btnReportes.setBorderPainted(false);
        panMenu.add(btnReportes);

        panTrabajo.setBackground(panContainer.getBackground());
        panTrabajo.setLayout(new javax.swing.BoxLayout(panTrabajo, javax.swing.BoxLayout.LINE_AXIS));

        javax.swing.GroupLayout panContainerLayout = new javax.swing.GroupLayout(panContainer);
        panContainer.setLayout(panContainerLayout);
        panContainerLayout.setHorizontalGroup(
            panContainerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panTrabajo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panMenu, javax.swing.GroupLayout.DEFAULT_SIZE, 944, Short.MAX_VALUE)
        );
        panContainerLayout.setVerticalGroup(
            panContainerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panContainerLayout.createSequentialGroup()
                .addComponent(panTrabajo, javax.swing.GroupLayout.DEFAULT_SIZE, 285, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        getContentPane().add(panContainer);

        jMenuBar1.setBackground(new java.awt.Color(127, 85, 58));

        jMenu1.setForeground(new java.awt.Color(248, 91, 108));
        jMenu1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cream3.png"))); // NOI18N
        jMenu1.setText("File");
        jMenu1.setFont(new java.awt.Font("Arial Black", 1, 14)); // NOI18N
        jMenuBar1.add(jMenu1);

        jMenu2.setBackground(new java.awt.Color(239, 99, 105));
        jMenu2.setForeground(new java.awt.Color(248, 91, 108));
        jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cream2.png"))); // NOI18N
        jMenu2.setText("Edit");
        jMenu2.setFont(new java.awt.Font("Arial Black", 1, 14)); // NOI18N
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        // TODO add your handling code here:
        panTrabajo.removeAll();
        panTrabajo.add(new panPedidos());
        panTrabajo.updateUI();
    }//GEN-LAST:event_formWindowOpened

    private void btnPedidosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnPedidosMouseClicked
        // TODO add your handling code here:
        panTrabajo.removeAll();
        panTrabajo.add(new panPedidos());
        panTrabajo.updateUI();
    }//GEN-LAST:event_btnPedidosMouseClicked

    private void btnVentasMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnVentasMouseClicked
        // TODO add your handling code here:
         panTrabajo.removeAll();
         panTrabajo.add(new panVentas());
         panTrabajo.updateUI();
    }//GEN-LAST:event_btnVentasMouseClicked

    private void btnUsuariosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnUsuariosMouseClicked

        panTrabajo.removeAll();
        panTrabajo.add(new panUsuarios());
        panTrabajo.updateUI();
        // TODO add your handling code here:
    }//GEN-LAST:event_btnUsuariosMouseClicked

    private void btnProductosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnProductosMouseClicked
        // TODO add your handling code here:
        panTrabajo.removeAll();
        panTrabajo.add(new panProductos());
        panTrabajo.updateUI();
    }//GEN-LAST:event_btnProductosMouseClicked

    private void btnClientesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnClientesMouseClicked
        // TODO add your handling code here:
        panTrabajo.removeAll();
        panTrabajo.add(new panadministrarclientes());
        panTrabajo.updateUI();
    }//GEN-LAST:event_btnClientesMouseClicked

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Metal".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(frmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(frmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(frmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(frmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new frmMain().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnClientes;
    private javax.swing.JButton btnPedidos;
    private javax.swing.JButton btnProductos;
    private javax.swing.JButton btnReportes;
    private javax.swing.JButton btnUsuarios;
    private javax.swing.JButton btnVentas;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel panContainer;
    private javax.swing.JPanel panMenu;
    private javax.swing.JPanel panTrabajo;
    // End of variables declaration//GEN-END:variables
}
